﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Gufa.EntityFrameworkCore.Migrations
{
    /// <inheritdoc />
    public partial class AddExperienceTable_DelFlag : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropCheckConstraint(
                name: "CK_DelFlag_Values1",
                table: "T_Teches");

            migrationBuilder.AddColumn<int>(
                name: "DelFlag",
                table: "T_Experience",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddCheckConstraint(
                name: "CK_DelFlag_Values2",
                table: "T_Teches",
                sql: "DelFlag IN (0, 1)");

            migrationBuilder.AddCheckConstraint(
                name: "CK_DelFlag_Values1",
                table: "T_Experience",
                sql: "DelFlag IN (0, 1)");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropCheckConstraint(
                name: "CK_DelFlag_Values2",
                table: "T_Teches");

            migrationBuilder.DropCheckConstraint(
                name: "CK_DelFlag_Values1",
                table: "T_Experience");

            migrationBuilder.DropColumn(
                name: "DelFlag",
                table: "T_Experience");

            migrationBuilder.AddCheckConstraint(
                name: "CK_DelFlag_Values1",
                table: "T_Teches",
                sql: "DelFlag IN (0, 1)");
        }
    }
}
